/* 
 * File:   ThresholdCalculator.h
 * Author: root
 *
 * Created on October 28, 2015, 6:29 AM
 */

#ifndef THRESHOLDCALCULATOR_H
#define	THRESHOLDCALCULATOR_H

#include "RawData.h"
#include "SensorData.h"
#include "Buffer.h"

class ThresholdCalculator {
public:
    ThresholdCalculator();
    ThresholdCalculator* getInstance();
    double getDeviation();

    void release();
    uint32 update(const SensorData *paraSensor);
    
    double getThreshold();
    

    Buffer<SensorData, 200> sensorBuffer;
    double d;
    double e;
    
    
private:
    static ThresholdCalculator* instance;
};

#endif	/* THRESHOLDCALCULATOR_H */

